﻿if exists (select * from sysobjects where id = object_id(N'pBUGLOGTestResultsAdd') and sysstat & 0xf = 4) drop procedure pBUGLOGTestResultsAdd 
GO

-- Creates a new record in the [dbo].[TestResults] table.
CREATE PROCEDURE pBUGLOGTestResultsAdd
    @p_TestResult varchar(25),
    @p_TestResultDescription varchar(250),
    @p_TestResultID_out int output
AS
BEGIN
    INSERT
    INTO [dbo].[TestResults]
        (
            [TestResult],
            [TestResultDescription]
        )
    VALUES
        (
             @p_TestResult,
             @p_TestResultDescription
        )

    SET @p_TestResultID_out = SCOPE_IDENTITY()

END

